<?php
header("Content-type: text/html; charset=utf-8");
if (! isset($_REQUEST['hook'])) {file_put_contents("autoinstall.log","非法请求");die ('非法请求');}

$hook = json_decode($_REQUEST["hook"], true);
if ($hook['password'] !="wjp2015") {file_put_contents("autoinstall.log","密码错误");die ("密码错误");}
$res = shell_exec("bash autoinstall.sh");
if($res){
file_put_contents("autoinstall.log",$res);
}else{
   file_put_contents("autoinstall.log","执行返回为空"); 
}
?>
